<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test :: Stove SingleTimer</title>
	<style>
    .box
    {
        position:absolute;
        width: 50px;
        height: 50px;
        top: 10px;
        left: 10px;
        background-color: #f00;
    }
    </style>
	<script src="./js/importlibs.js"></script>
    <script type="text/javascript">
		window.onload = function()
		{
			var _box0, _box1, _box2;
			
			_box0  = document.getElementsByClassName( "box" )[0];
			_box0.style.top = "10px";
			STSingleTimer.addListener( onUpdate0 );
			var _x0 = 10;
			function onUpdate0()
			{
				_box0.style.left = (_x0 += 10 )+"px";
			}
			
			_box1  = document.getElementsByClassName( "box" )[1];
			_box1.style.top = "100px";
			STSingleTimer.addListener( onUpdate1, 500 );
			var _x1 = 10;
			function onUpdate1()
			{
				_box1.style.left = (_x1 += 10 )+"px";
			}
			
			_box2  = document.getElementsByClassName( "box" )[2];
			_box2.style.top = "160px";
			STSingleTimer.addListener( onUpdate2, 100 );
			var _x2 = 10;
			function onUpdate2()
			{
				_box2.style.left = (_x2 += 10 )+"px";
			}
		}
	</script>
</head>

<body>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</body>
</html>
